package com.atguigu.day07.test;

/**
 * @version 1.0
 * @Author 马冰
 * @Date 2024/11/6 14:16
 * @注释
 */
public class Study {
    String name;
    int age;
    char gender;
    String grade;
    public void language(){
        System.out.println("学习语文");
    }
    public void math(){
        System.out.println("学习数学");
    }
    public void english(){
        System.out.println("学习英语");
    }
}

class StudyTest{
    public static void main(String[] args) {
        Study s1 = new Study();
        s1.name = "李华";
        s1.age = 18;
        s1.gender = '男';
        s1.grade = "三年级";
        System.out.println("姓名：" + s1.name);
        System.out.println("年龄：" + s1.age);
        System.out.println("性别：" + s1.gender);
        System.out.println("年级：" + s1.grade);
        s1.language();
        s1.math();
        s1.english();
        System.out.println("-------------------");
        Study s2 = new Study();
        s2.name = "猢狲";
        s2.age = 8;
        s2.gender = '女';
        s2.grade = "大学七年级";
        System.out.println("姓名：" + s2.name);
        System.out.println("年龄：" + s2.age);
        System.out.println("性别：" + s2.gender);
        System.out.println("年级：" + s2.grade);
        s2.language();
        s2.math();
        s2.english();
    }

}
